html,
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #070707;
  display: flex;
  color: var(--my-btn-text-color);
  font-size: 16px;
  flex-direction: column;
  box-sizing: border-box;
  min-width: fit-content;
  /* min-height: fit-content; */
  /* overflow: hidden; */
  /* 禁止 body 自身滚动 */
  /* ✅ 关键：允许 body 被撑宽 */
  -ms-overflow-style: none;
  /* IE, Edge 隐藏滚动条 */
  scrollbar-width: none;
  /* Firefox 隐藏滚动条 */
}

html::-webkit-scrollbar,
/* Chrome, Safari, Edge */
body::-webkit-scrollbar {
  display: none;
  /* 隐藏滚动条 */
}

#content_div {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: calc(100% - 30px);
  /* 如果 nav 高度为 60px，可按实际修改 */
  overflow: hidden;
  gap: 10px;
}


nav {
  height: 30px;
  padding: 10px 20px;
}

nav,
#nav_left,
#nav_right {
  display: flex;
  flex-direction: row;
  /* color: white; */
  gap: 20px;
  align-items: center;
  /* ⭐ 垂直居中关键 */
  justify-content: space-between;
}

nav * {
  height: 100%;
}

ul {
  list-style: none;
  /* 去掉列表前面的点 */
  padding: 0;
  margin: 0;

}

nav ul {
  display: flex;
  /* 横向排列 */
}

nav li {
  margin-right: 20px;
  border: none;
}

li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(10px, 100%, 24px);
}

li a {
  text-decoration: none;
  /* 去掉下划线 */
  color: var(--my-btn-text-color);
  align-items: center;
  border: 0.5px solid var(--my-btn-border-color);
  border-radius: 999px;
  padding: 5px 10px;
  height: calc(100% - 10px);
  font-weight: normal;
  transition: background-color 0.2s ease;
  background: linear-gradient(to bottom, #0B85FE40, #0B85FF13);
  display: flex;
  justify-content: center;
  white-space: nowrap;
  /* 防止换行 */
  display: inline-flex;
  /* 让宽度随内容变化，高度保持统一 */
}

li a .icon {
  margin-right: 8px;
  font-size: 14px;
}

li a .icon_arrow {
  margin-left: 8px;
  font-size: 12px;
}

#nav_right button {
  padding: 0;
  aspect-ratio: 1;
}

/* 默认按钮图片 */
#btn_person img {
  content: url("../resources/person_off.png");
}

#btn_setting img {
  content: url("../resources/setting_off.png");
}

/* 选中状态切换图片 */
#btn_person.selected img {
  content: url("../resources/person_on.png");
}

#btn_setting.selected img {
  content: url("../resources/setting_on.png");
}



#bg_char_div,
#bg_eq_div {
  flex-shrink: 0;
  overflow: hidden;
  /* 防止意外滚动 */
}

#bg_char_div {
  /* height: 180px; */
  flex: 1;

}

/* eq部分 */
#bg_eq_div {
  /* height: 200px; */
  display: flex;
  flex-direction: row;
  gap: 5px;
  flex: 1;
}

#bg_eq_div input[type=number]::-webkit-inner-spin-button,
#bg_eq_div input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

#bg_eq_title {
  padding: 5px 5px 0 5px;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
  height: calc(100% - 7px);
}

#bg_eq_title button {
  width: 100%;
  border-radius: 5px;
}

#btn_gain:hover {
  background: #E9294799;
  --shadow-color: #E9294799;
}

#btn_freq:hover {
  background: #32D74B99;
  --shadow-color: #32D74B99;
}

#btn_q:hover {
  background: #0B84FF99;
  --shadow-color: #0B84FF99;
}

#btn_gain:active,
#btn_gain.selected {
  background: #E92947;
  --shadow-color: #E92947;
}

#btn_freq:active,
#btn_freq.selected {
  background: #32D74B;
  --shadow-color: #32D74B;
}

#btn_q:active,
#btn_q.selected {
  background: #0B84FF;
  --shadow-color: #0B84FF;
}


#my_db_level {
  flex-grow: 1;
  width: 59%;
  /* padding: 0; */
  margin: 0;
  /* 
  background: wheat; */
}

.eq_item {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* background-color: red; */
  padding: 5px 0 0 0;
  margin: 0;
  min-width: 35px;
  width: 100%;
  height: calc(100% - 7px);
}


.eq_number {
  background-color: transparent;
  /* max-width: 60px;
  min-width: 32px;
  width: calc(100% - 10px); */
  width: 32px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 0.5px solid #0B84FF;
  font-size: 16px;
  display: flex;
  align-items: center;
  /* 垂直居中 */
  justify-content: center;
  /* 水平居中 */
}

.eq_slider {
  flex-grow: 1;
}

.bg_eq_num {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(100% - 4px);
  flex: 1;
  border-radius: 5px;
  padding: 2px 2px;
  background: #1C1C1E;
  gap: 2px;
}

.bg_eq_num button,
.bg_eq_num input {
  width: calc(100% - 4px);
  flex: 1;
}

.bg_eq_num input {
  padding: 0 2px;
  border-radius: 5px;
  border: 0.5px solid var(--my-span-border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  text-align: center;
  color: white;
}

.bg_eq_num input:focus {
  border: 1px solid var(--my-theme-color);
  box-shadow: 0 0 0 0.5px black;
  outline: none;
  /* 移除默认蓝色高亮 */
}

/*  delay,高低通部分*/
#bg_other_div {
  background-color: transparent;
  display: grid;
  grid-template-columns: 270fr 340fr 320fr 320fr 390fr 160fr;
  gap: 10px;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  flex: 3;
}

#bg_other_div .bg_gray_div {
  padding: 10px 0;
  height: calc(100% - 20px);
}

.bg_content {
  display: grid;
  grid-template-rows: 40fr 400fr;
  gap: 10px;
  place-items: center;
  /* background: blue; */
  /* 等同于 align-items + justify-items 同时居中 */
}

.bg_title {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: end;
  gap: 5px;
  width: 100%;
}

.bg_title2 {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  gap: 10px;
  width: 100%;
}

.my_content {
  width: calc(100% - 20px);
  height: 100%;
  padding: 0 10px;
  background: transparent;
  border: none;
}


/* 延迟设置 */
#bg_delay .my_content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0;
}

#bg_middle_delay {
  width: 100%;
  height: 100%;
  /* background: blue; */
  display: grid;
  grid-template-rows: 50fr 340fr 50fr;
  place-items: center;
}

.horn_item_div {
  height: 50px;
  max-height: 50px;
  /* max-width: 60px; */
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 水平居中 */
  justify-content: center;
  /* 垂直居中（如果需要） */
  gap: 5px;
  /* background: purple; */
}

/* 延迟输入框 */
.input-delay {
  flex: 40%;
  width: 100%;
  min-width: 70px;
  max-width: 90px;
  display: flex;
  justify-content: center;
  padding-left: 5px;
  /* padding: 8px 12px; */
  /* margin-left: 20px; */
  font-size: 16px;
  border: 1px solid var(--my-span-border-color);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  /* width: 100%; */
  /* max-width: 40px; */
  box-sizing: border-box;
  text-align: center;
  background: transparent;
  color: var(--my-btn-text-color);
}

.input-delay:focus {
  border-color: #0B84FF;
  box-shadow: 0 0 0 2px #0B84FF88;
}


.horn-delay {
  flex: 60%;
  /* 内部水平居中 */
  height: auto;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background-color: transparent;
  border-radius: 50%;
  aspect-ratio: 1;
  min-width: 30px;
  min-height: 30px;
  max-width: 50px;
  max-height: 50px;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s;
}

.horn-delay img {
  position: relative;
  /* 确保在波纹上层 */
  width: 80%;
  height: 80%;
  z-index: 1;
  left: -10%;
}

.horn-delay:active {
  transform: scale(0.98);
}

.ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190%;
  height: 190%;
  background: #0B84FF;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-animation 1.5s infinite;
  pointer-events: none;
}

.ripple:nth-child(1) {
  animation-delay: 0s;
}

.ripple:nth-child(2) {
  animation-delay: 0.5s;
}

.ripple:nth-child(3) {
  animation-delay: 1s;
}

@keyframes ripple-animation {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.5;
  }

  70% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.3;
  }

  90% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.2;
  }

  100% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.0;
  }
}


#bg_middle_delay div {
  width: 100%;
  height: 100%;
}

#top_horn_div {
  /* background: yellow; */
  display: flex;
  flex-direction: column;
  align-items: center;
}

#bottom_horn_div {
  /* background: gold; */
  display: flex;
  flex-direction: column;
  align-items: center;
}

#middle_horn_div {
  /* background: red; */
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  place-items: center;
  /* background: wheat; */
}

#middle_horn_left_div {
  /* background: aqua; */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  /* 子元素靠右 */
  justify-content: space-between;
  /* background: yellow; */

}

#middle_horn_right_div {
  /* background: plum; */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* 子元素靠左 */
  justify-content: space-between;
  /* background: blue; */

}

#delay_type_div {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
}


#delay_type_div button {
  min-width: 60px;
}

/*  通道设置 */
#bg_high_pass,
#bg_low_pass {
  height: 100%;
  width: 100%;
  padding: 0;
  background: transparent;
}

#bg_channel .my_content {
  display: grid;
  grid-template-columns: 40px 300fr;
  place-items: center;
}

.bg_ch_items {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* gap: 10px; */
  align-items: center;
  justify-content: space-between;
  /* background: aqua; */
}


.bg_ch_items.group {
  /* padding: 30px 0px; */
  /* height: calc(100% - 60px); */
  height: 100%;
  width: 100%;
  /* background: gold; */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.bg_ch_items.group button {
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  /* background: wheat; */
  position: absolute;
}

.bg_ch_items.group button img {
  width: 108%;
  height: 105%;
  content: url("../resources/ble_off.png");
}


.bg_ch_items.group button:hover img,
.bg_ch_items.group button:active img,
.bg_ch_items.group button.selected img {
  content: url('../resources/ble_on.png');
}


.ch_item_div {
  /* padding-left: 10px; */
  width: 100%;
  /* height: 100%; */
  height: 35px;
  /* background: blue; */
  display: grid;
  border: none;
  grid-template-columns: minmax(60px, 1fr) 6px minmax(100px, 1fr);
  /* grid-template-columns: 1fr 6px 1fr; 关键代码 */
  place-items: center;
  gap: 10px;
}

.ch_item_div .ch_num {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  /* 垂直居中 */
  justify-content: center;
  /* 水平居中（可选） */
}

.ch_color {
  height: 80%;
  border-radius: 3px;
  width: 6px;
  /* background: red; */
}

.ch_item_div button {
  height: 100%;
  width: 100%;
}

/* 高低通 */
.ch_pass_item_div {
  height: 35px;
  width: calc(100% - 20px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* ✅ 完全平均分列 */
  gap: 10px;
  place-items: center;
  padding: 0 10px;
}

.ch_pass_item_div:hover input,
.ch_pass_item_div:hover button {
  color: var(--my-theme-color);
}

.ch_pass_item_div input {
  width: 100%;
  height: 100%;
  min-width: 80px;
  border: none;
  padding: 0;
  background: transparent;
  text-align: center;
  color: white;
  outline: none;
  /* 去除聚焦时的蓝色外框 */
}

.ch_pass_item_div button {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
}

.ch_pass_item_div button:active {
  transform: scale(1.1);
}

/* 分贝音量 */
.ch_db_item_div {
  display: grid;
  grid-template-columns: 1fr 6px;
  /* 左边自适应，右边固定 100px */
  height: 35px;
  width: 100%;
  gap: 10px;
}

.ch_item_left_div {
  display: grid;
  grid-template-columns: 50px 1fr 50px 30px;
  /* 左边自适应，右边固定 100px */
  padding: 0 20px 0 10px;
  width: calc(100% - 30px);
  height: 100%;
  gap: 10px;
  place-items: center;
}

.ch_item_left_div button {
  width: 100%;
  height: auto;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.ch_item_left_div span {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ch_item_left_div:hover span,
.ch_item_left_div:hover button {
  color: var(--my-theme-color);
}

.ch_item_left_div .my_db_input {
  /* transform: rotate(0deg); */
  direction: ltr;

  /* 翻转方向 */
  writing-mode: horizontal-tb;
  width: 100%;
  height: 9px;
}

.my_db_input::-webkit-slider-runnable-track {
  /* width: 10px; */
  width: 100%;
  height: 10px;
}

/* 滑块 */
.my_db_input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--my-theme-color);
  border-radius: 50%;
  /* margin-top: 33px; */
  cursor: pointer;
}

.ch_item_left_div button img {
  content: url("../resources/turn_on.png");
}

.ch_item_left_div button.selected img {
  content: url('../resources/turn_off.png');
}


/* master 总音量 */
#bg_master .my_content {
  display: grid;
  grid-template-rows: 1fr 40px;
  gap: 10px;
  height: 100%;
}

#bg_master_top {
  width: 100%;
  height: calc(100% - 10px);
  height: auto;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 5px;
}

#bg_master_bottom {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.master_scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.master_scale>* {
  height: 20px;
  text-align: center;
  line-height: 20px;
}

#bg_master_slider {
  height: calc(100% - 20px);
  padding: 10px;
  background: var(--my-bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 8px #ffffff22;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 0;
}

#verticalSlider {
  z-index: 2;
  width: 8px;
  margin: 0;
  flex-grow: 1;
}

/* WebKit (Chrome, Safari, Electron) */
#verticalSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  /* 清除默认thumb */
  appearance: none;
  width: 20px;
  /* 图片宽度 */
  height: 20px;
  /* 图片高度 */
  background: url('../resources/slider_p2.png') no-repeat center;
  background-size: contain;
  cursor: pointer;
  border: none;
  /* 移除边框 */
}

/* Firefox */
#verticalSlider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: url('../resources/slider_p2.png') no-repeat center;
  background-size: contain;
  cursor: pointer;
  border: none;
  border-radius: 0;
}

/* IE */
#verticalSlider::-ms-thumb {
  width: 20px;
  height: 20px;
  background: url('../resources/slider_p2.png') no-repeat center;
  background-size: contain;
  cursor: pointer;
  border: none;
}

.ticks {
  position: absolute;
  width: 60%;
  height: calc(100% - 20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ticks div {
  width: 100%;
  height: 2px;
  background: #0B84FF;
  opacity: 0.5;
}

.master_btn_item {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  gap: 5px;
  min-height: 0px;
}

.master_btn_item span {
  width: 100%;
  height: 16px;
}

.master_btn_item button {
  width: 35px;
  flex-grow: 1;
  min-height: 0px;
  border: none;
  padding: 0;
  margin: 0;
  background: linear-gradient(180deg, #3C3C40, #1C1C1E);
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

#master_mute:hover {
  transform: translateY(-2px);
  /* 悬浮轻微上浮 */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
}

#master_mute img {
  object-fit: fill;
  width: 105%;
  height: 115%;
  content: url('../resources/turn_on.png');
}

#master_mute.selected img {
  content: url('../resources/turn_off.png');
}

/* 通道合频弹窗 */
#channel_setup_alert {
  padding: 0px 10px 20px 10px;
  width: fit-content;
  height: fit-content;
  /* 可选，通常高度会自动撑开 */
  /* position: fixed; */
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  gap: 20px;
  box-shadow: 0 0 4px #aaa;
  color: white;
}

.sum_source_div {
  width: 100%;
  height: auto;
  min-width: 550px;
}

.sum_title_div>* {
  width: 100px;
  font-size: 14px;
}

.sum_title_div,
.sum_source_div ul {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  height: 100%;
}

.sum_source_div ul span {
  min-width: 120px;
  height: 18px;
  margin-left: 18px;
}

.sum_source_div ul img {
  width: 18px;
  height: 18px;
}

#sum_grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.sum_item_container {
  width: 100%;
  height: 100%;
  position: relative;
}

.sum_item {
  display: grid;
  grid-template-columns: repeat(6, 14px);
  row-gap: 16px;
  /* 两行间距 20px */
  column-gap: 2px;
  /* 可选：格子之间间距 */
  justify-content: center;
  padding: 0;
  border-radius: 4px;
}

.sum_item_cell {
  width: auto;
  aspect-ratio: 1/1;
  background: var(--my-bg-color);
  color: #aaa;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  font-size: 10px;
}

.sum_ch_name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 6px 0;
  color: #aaa;
  font-size: 10px;
  pointer-events: none;
}

#sum_l_r_div {
  width: 200px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
}

.sum_l_r_item {
  width: 100%;
  height: 100%;
  display: flex;
  color: #aaa;
  align-items: center;
  justify-content: center;
  border: none;
}

#sum_input_div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  height: 100%;
}

#sum_input_mode {
  width: 100%;
  height: auto;
}

#sum_input_mode ul {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  height: 100%;
}

#sum_input_mode ul span {
  min-width: 60px;
}

#sum_input_select {
  width: auto;
  height: 60px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(6, 50px);
  color: #aaa;
  font-size: 12px;
  /* justify-content: center; */
  /* 水平居中 */
  align-items: center;
  /* 垂直居中（如果有高度） */
  gap: 5px;
  padding: 10px;
}

#sum_input_select .sum_l_r_item {
  justify-content: left;
}

input[type="checkbox"] {
  appearance: none;
  /* 去除浏览器默认样式 */
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border: 1px solid #97979788;
  border-radius: 50%;
  /* 让其变圆 */
  background: var(--my-bg-color);
}

input[type="checkbox"]:checked {
  background: var(--my-theme-color);
  /* 选中时背景色 */
  border-color: var(--my-theme-color);
  /* 选中时边框色 */
}

/* 弹框 */
.ml_message {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2;
  display: none;
  color: black;
}

.ml_message>* {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.ml_message_content {
  padding: 10px 20px;
  border-radius: 10px;
  background-color: #fff;
  z-index: 3;
}